<template>
	<div class="sys-file-container">
		<el-dialog
			v-model="state.isShowDialog"
			draggable
			:close-on-click-modal="false"
			width="500px"
		>
			<template #header>
				<div style="color: #fff">
					<el-icon
						size="16"
						style="
							margin-right: 3px;
							display: inline;
							vertical-align: middle;
						"
					>
						<ele-Edit />
					</el-icon>
					<span> {{ props.title }} </span>
				</div>
			</template>
			<el-form
				:model="state.ruleForm"
				ref="ruleFormRef"
				label-width="auto"
			>
				<el-row>
					<el-col
						:xs="24"
						:sm="24"
						:md="24"
						:lg="24"
						:xl="24"
						class="mb20"
					>
						<el-form-item
							label="文件名称"
							prop="fileName"
							:rules="[
								{
									required: true,
									message: '文件名称不能为空',
									trigger: 'blur',
								},
							]"
						>
							<el-input
								v-model="state.ruleForm.fileName"
								placeholder="文件名称"
								clearable
							/>
						</el-form-item>
					</el-col>
				</el-row>
			</el-form>
			<template #footer>
				<span class="dialog-footer">
					<el-button @click="cancel">取 消</el-button>
					<el-button type="primary" @click="submit">确 定</el-button>
				</span>
			</template>
		</el-dialog>
	</div>
</template>

<script>
export default {
	name: "sys-file-dialog",
	data() {
		return {};
	},
	mounted() {},
	methods: {
		cancel() {
			this.$emit("cancel");
		},
		submit() {
			this.$emit("submit", this.state.ruleForm);
		},
	},
};
</script>
